import request from '@/utils/request'





export function discountAdd(data) {
  return request({
    url: `/goods/discount`,
    method: 'post',
    data
  })
}

export function discountDetails(goodsId) {
  return request({
    url: `/goods/discount/${goodsId}`,
    method: 'get',
  })
}

export function discountList(params) {
  return request({
    url: `/goods/discount/list`,
    method: 'get',
    // responseType: 'blob',
    params
  })
}




export function evaluateList(params) {
  return request({
    url: `/goods/comment/list`,
    method: 'get',
    params
  })
}

export function attributeDeatils(goodsId) {
  return request({
    url: `/goods/attribute/${goodsId}`,
    method: 'get',
  })
}


export function attributeEdit(data) {
  return request({
    url: `/goods/attribute`,
    method: 'put',
    data
  })
}


export function attributeAdd(data) {
  return request({
    url: `/goods/attribute`,
    method: 'post',
    data
  })
}

export function attributeList(params) {
  return request({
    url: `/goods/attribute/list`,
    method: 'get',
    params
  })
}


export function goodsAdd(data) {
  return request({
    url: `/goods`,
    method: 'post',
    data
  })
}

export function goodsDetail(goodsId) {
  return request({
    url: `/goods/${goodsId}`,
    method: 'get',
  })
}

export function goodsDelete(goodsId) {
  return request({
    url: `/goods/${goodsId}`,
    method: 'delete',
  })
}

export function goodsEdit(data) {
  return request({
    url: `/goods`,
    method: 'put',
    data
  })
}
export function goodsList(params) {
  return request({
    url: `/goods/list`,
    method: 'get',
    params
  })
}

export function priceCalendarList(params) {
  return request({
    url: `/priceCalendar/list`,
    method: 'get',
		params
  })
}
export function priceCalendarUpdate(params) {
  return request({
    url: `/priceCalendar/update`,
    method: 'get',
		params
  })
}

export function goodsGroundingGood(data) {
  return request({
    url: `/goods/groundingGood`,
    method: 'post',
		data
  })
}

export function priceCalendarInitialization(data) {
  return request({
    url: `/priceCalendar/initialization`,
    method: 'get'
  })
}

export function priceCalendarUpdateCalendar(data) {
  return request({
    url: `/priceCalendar/updateCalendar`,
    method: 'post',
		data
  })
}